<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
  <body>
    <ui:composition template="../templates/default3.xhtml">
            <ui:define name="content">
                <h:form binding="#{noticeManagerBean.loadAddNotice}">     
                    <p:panel header="Create Notice For The Day" id="addNoticePanel">
                        <font class="fieldNote">* - Mandatory Field<br/></font> 
                        <p:messages/>
                        <table class="panel">
                            <br/><td valign="top"><br/>Notice title:</td>
                            <td> <br/><p:inputText required="true" id="title" requiredMessage="Notice Title Required" value="#{noticeManagerBean.title}"> 

                                </p:inputText>
                                <font class="fieldNote">*</font>
                            </td>

                            <tr>
                                <td valign="top">Notice Content:</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <p:inputTextarea style="width:300px;height:100px;" label="" required="true" id="description" requiredMessage="Notice Content Required" value="#{noticeManagerBean.description}"> 

                                                </p:inputTextarea> 
                                            </td>
                                            <td>    <font class="fieldNote">*</font>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>
                            <font color="red">* If none of the broadcast notice is selected, created notice will be automatically broadcasted to your own department. </font>
                            <tr >
                                <td valign="top">Broadcast notice</td>
                                <td><h:selectBooleanCheckbox id="Sales" value="#{noticeManagerBean.checkSales}" /> Sales department<br/>
                                    <h:selectBooleanCheckbox id="Marketing" value="#{noticeManagerBean.checkMarketing}" /> Marketing department<br/>
                                    <h:selectBooleanCheckbox id="Production" value="#{noticeManagerBean.checkProduction}"/> Production department<br/>
                                    <h:selectBooleanCheckbox id="Supplychain" value="#{noticeManagerBean.checkSupply}" /> Supply chain department<br/>
                                    <h:selectBooleanCheckbox id="Finance" value="#{noticeManagerBean.checkFinance}" /> Finance department<br/>
                                    <h:selectBooleanCheckbox id="Technology" value="#{noticeManagerBean.checkTechnology}" /> Technology department</td>

                            </tr>


                            <tr>
                                <td class="btn" colspan="3"><hr/><p:commandButton id="btnAddNotice" value="Create Notice" actionListener="#{noticeManagerBean.addNotice}" update="addNoticePanel" ajax="true" /></td>
                            </tr>
                        </table>
                    </p:panel>
                </h:form>
            </ui:define>        

        </ui:composition>

    </body>

</html>
